package com.caipiao.util.db;

/**
 * @author GaoFeng
 */

public class DBOutString
{
	private String str;
	
	public DBOutString()
	{
		this.str = "";
	}
	
	public DBOutString(String str)
	{
		this.setString(str);
	}
	
	public String toString()
	{
		if (this.str == null || this.str.toUpperCase().equalsIgnoreCase("N/A"))
		{
			return "";
		}
		
		return this.str;
	}
	
	public void setString(String str)
	{
		if (null != str)
		{
			this.str = str;
		}
		else
		{
			this.str = "";
		}
	};
	
	public boolean IsDB_OK()
	{
		return this.str.equalsIgnoreCase("0");
	}
	
	public boolean IsDB_EX()
	{
		return this.str.equalsIgnoreCase("999999");
	}
	
	public boolean IsDBEmpty()
	{
		return (this.str == null || this.str.isEmpty() || this.str.toUpperCase().equalsIgnoreCase("N/A"));
	}
}
